﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

using SMSSnew.DATA.CLASSES;

namespace SMSSnew.UI.vicePrincipal.timetable.dataEntry
{
    public partial class vicePrinEditSubjectDetails1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                subjectSubTypesCLZ objTT = new subjectSubTypesCLZ();

                DataTable dt1;

                dt1 = objTT.LoadSubjectNameEdit();

                if (dt1.Rows.Count != 0)
                {
                    for (int i = 0; i < dt1.Rows.Count; i++)
                    {
                        cboSubjectName.Items.Insert(i, dt1.Rows[i][0].ToString());
                    }
                }

            }
        }

        protected void cboSubjectName_SelectedIndexChanged(object sender, EventArgs e)
        {
            DataTable dt2;
            subjectSubTypesCLZ objClass = new subjectSubTypesCLZ(cboSubjectName.SelectedItem.ToString());
            subjectSubTypesCLZ objTT = new subjectSubTypesCLZ();
            dt2 = objTT.LoadSubjectCodeForEdit(objClass);

            cboSubjectCode.Items.Clear();

            if (dt2.Rows.Count != 0)
            {
                for (int i = 0; i < dt2.Rows.Count; i++)
                {
                    cboSubjectCode.Items.Insert(i, dt2.Rows[i][0].ToString());
                }
            }

        }
    }
}
